﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing.Printing;
using System.Drawing;

namespace Tourreau.Gilles.FaxDotNet.Demo
{
    /// <summary>
    /// This class demonstrate using the fax server API with the Microsoft <see cref="PrintDocument"/> feature.
    /// It just print a "This is a demo from the Fax .NET library !"
    /// </summary>
    public class FaxPrintDocumentDemo : PrintDocument
    {
        protected override void OnPrintPage(PrintPageEventArgs e)
        {
            using (Font font = new Font("Arial", 14))
            {
                e.Graphics.DrawString("This is a demo from the Fax .NET library !", font, Brushes.Black, new Point(16, 64));
            }

            base.OnPrintPage(e);
        }
    }
}
